//
//  ShopCartMarkerView.m
//  News
//
//  Created by weige on 16/6/12.
//  Copyright © 2016年 weige. All rights reserved.
//

#import "ShopCartMarkerView.h"
@interface ShopCartMarkerView()
{
    UIImageView *rocketImageView;
    UILabel *marketTitleLabel;
    UIImageView *redDotImaegView;
    UILabel *marketLabel;
}
@end
@implementation ShopCartMarkerView
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self cretaShopCartMarkerUI];
    }
    return self;
}
-(void)cretaShopCartMarkerUI
{
    self.backgroundColor=[UIColor whiteColor];
    rocketImageView=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"icon_lighting"]];
    [self addSubview:rocketImageView];
    marketTitleLabel=[[UILabel alloc]init];
    marketTitleLabel.textAlignment=NSTextAlignmentLeft;
    marketTitleLabel.text=@"闪电超市";
    marketTitleLabel.textColor=SUBTITLECOLOR;
    marketTitleLabel.font=[UIFont systemFontOfSize:12];
    [self addSubview:marketTitleLabel];
    redDotImaegView=[[UIImageView alloc]initWithFrame:CGRectMake(15, 36, 5 , 5)];
    redDotImaegView.image=[UIImage imageNamed:@"reddot"];
    [self addSubview:redDotImaegView];
    marketLabel=[[UILabel alloc]init];
    marketLabel.textAlignment=NSTextAlignmentLeft;
    marketLabel.text=@"22:00前满$30免运费,22:00后满$50面运费";
    marketLabel.textColor=SUBTITLECOLOR;
    marketLabel.font=[UIFont systemFontOfSize:12];
    [self addSubview:marketLabel];

}
-(void)layoutSubviews
{
    [super layoutSubviews];
    rocketImageView.frame=CGRectMake(15, 5, 20, 20);
    marketTitleLabel.frame=CGRectMake(40, 5, 200, 20);
    marketLabel.frame=CGRectMake(40, 30, 270, 20);
}
@end
